﻿using System;

namespace IntellectShop.Web2.ViewModels
{
	public class ImportFileResultViewModel
	{
		public string RecievedName { get; set; }

		public int RecievedLength { get; set; }

		public string ErrorMessage { get; set; }

		public override string ToString()
		{
			if (String.IsNullOrEmpty(this.ErrorMessage))
			{
				return String.Format(Resources.Strings.Imported, this.RecievedName, this.RecievedLength);
			}
			else
			{
				return String.Format(Resources.Strings.ImportError, this.RecievedName, this.ErrorMessage);
			}
		}
	}
}